package com.me.mygdxgame.util;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Preferences;


public class GamePreferences {

	public static final String TAG = 
			GamePreferences.class.getName();
	
	public static final GamePreferences instance = new GamePreferences();
	
	
	private Preferences prefs;
	
	

	private GamePreferences() {
		prefs = Gdx.app.getPreferences(Constants.PREFERENCES);
		
	}
	
	public void load(){
//		if(!prefs.contains("sound")){
			prefs.putBoolean("sound", true);
//		}
		prefs.flush();
		
	}

	public boolean getSound() {
		return prefs.getBoolean("sound");
	}

	public void setSound(boolean sound) {
		prefs.putBoolean("sound", sound);
		prefs.flush();
	}
	
	
}
